import math

def distance(perLocation,jianLocation):
    pX,pY = perLocation
    jX,jY = jianLocation
    pX = int(pX) 
    pY = int(pY) 
    jX = int(jX) 
    jY = int(jY) 
    Len = math.sqrt(pow((pX-jX),2)+pow((pY-jY),2))
    return Len 

n,personX,personY= input().split()
JianCeDian = {}

for i in range(int(n)):
    X,Y = input().split()
    int(X)
    int(Y)
    JianCeDian[distance((X,Y),(personX,personY))] = (X,Y)

dis = min(JianCeDian)
print(JianCeDian[dis])


